<template>
  <div class="wholesale-list block">
    <div class="header">
      <h2 class="title">应付账单管理</h2>
      <tabs :tabs-arr="tabArr" @returnIndex="handletabs" />
      <el-form ref="queryForm" :inline="true" label-position="right" :model="tableQuery">
        <el-form-item label="订单编号">
          <el-input v-model="tableQuery.orderCode" type="text" placeholder="请输入" />
        </el-form-item>

        <el-form-item label="支付用途" prop="supplierName">
          <el-select v-model="tableQuery.supplierName" placeholder="请选择">
            <el-option label="贷款" value="贷款"></el-option>
            <el-option label="押金" value="押金"></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="业务类型" prop="supplierName">
          <el-select v-model="tableQuery.supplierName" placeholder="请选择">
            <el-option label="批发采购" value="批发采购"></el-option>
            <el-option label="长期寄售" value="长期寄售"></el-option>
            <el-option label="手术跟台" value="手术跟台"></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="付款方 ">
          <el-input v-model="tableQuery.originalFactoryName" type="text" placeholder="请输入" />
        </el-form-item>

        <el-form-item label="汇款单号">
          <el-input v-model="tableQuery.originalFactoryName" type="text" placeholder="请输入" />
        </el-form-item>

        <el-form-item label="下单时间">
          <el-date-picker
            v-model="commitDate"
            type="datetimerange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>

        <el-form-item label="支付时间">
          <el-date-picker
            v-model="commitDate"
            type="datetimerange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>

        <el-form-item class="form-button">
          <el-button type="primary" @click="queryFormQuery">查询</el-button>
          <el-button @click="queryFormReset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="hr"></div>
    <section class="el-container container-box is-vertical">
      <div class="operate">
        <el-button type="primary" size="mini" @click="exportEx">导出</el-button>
      </div>
      <el-editable
        :data="payload.content"
        height="200"
        v-loading="tableLoading"
        :columns="columns"
        :payload="payload"
        :needPagination="true"
        @reload="reloadProductData"
      >
        <template slot="default-action" slot-scope="scope">
          <el-button
            v-if="scope.row.orderStatus !== 0"
            type="text"
            @click="checkDetail(scope.row)"
          >查看</el-button>
        </template>
      </el-editable>
    </section>
  </div>
</template>

<script src="./index.js"></script>

<style lang="less" src="./index.less" scoped></style>
